//
//  ViewController.m
//  shiLeChlorella
//
//  Created by HX on 2017/7/20.
//  Copyright © 2017年 TXB. All rights reserved.
//

#import "XBHomeViewController.h"
#import "XBPushViewController.h"

@interface XBHomeViewController () 
@property (nonatomic, assign) BOOL from;
@end

@implementation XBHomeViewController

 


- (void)viewDidLoad {
     [super viewDidLoad];

     [self setNavigationItem];
     self.title = @"首页";
     self.view.backgroundColor = [UIColor whiteColor];


     UIButton *button = [[UIButton alloc] init];
     button.frame = CGRectMake(0, 0, 100, 44);
     button.center = CGPointMake(SCREEN_WIDTH * 0.5, SCREENH_HEIGHT * 0.5);
     [button setTitle:@"点击" forState:UIControlStateNormal];
     [button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
     XXViewBorderRadius(button, 6.0, 0.5, [UIColor redColor]);
     [self.view addSubview:button];
     [button addTarget:self action:@selector(click) forControlEvents:UIControlEventTouchUpInside];

 
}

- (void)setNavigationItem
{

     [self pd_setNavigationBarTitle:@"首页" leftIcon:@"icon" leftHandle:^{
          [[PDSlideViewController slideVC] showLeftVC];
     } rightTitle:@"右边" rightHandle:^{

     }];
}



- (void)click
{
     XBPushViewController *pushVC = [[XBPushViewController alloc] init];
     [self.navigationController pushViewController:pushVC animated:YES];

}





@end
